Using
MCIWnd Palettes
Playing video
clips with 8-bit color depth (256-color capacity) requires a palette to define
the colors being used. Sometimes, the palette included with a video clip is not
the most appropriate palette to use during playback. In this case, MCIWnd
provides three ways to manage palettes for playback:
Retrieve a handle to the
palette associated with an MCIWnd window by using the MCIWndGetPalette macro. The palette is not
necessarily associated exclusively with the MCIWnd window. Other applications
can access, and even invalidate, the palette handle. Consequently, your
application should anticipate the global use of the palette and, when finished
with the palette, should not free it.
Specify a new palette to use
with the video clip associated with an MCIWnd window by using the MCIWndSetPalette macro.
Realize the palette associated
with an MCIWnd window to the system palette by using the MCIWndRealize macro. This macro calls the RealizePalette function with the palette
associated with the MCIWnd window. If your application message handlers for WM_PALETTECHANGED and WM_QUERYNEWPALETTE call only RealizePalette
or MCIWndRealize, you must forward these messages to MCIWnd if you do
not handle them yourself.
Note When a video
clip with 8-bit color depth is loaded into the MCIWnd window, the palette
included with that clip replaces the palette associated with the MCIWnd window.